<div class="main-content">

    <div class="header bg-white a-shadow-light-s sticky-top">

        <div class="row mx-0">

            <ul class="col nav nav-tabs  mt-2 px-4">
                <li class="nav-item">
                    <a class="py-3 nav-link [if[::constants.Params.status=enabled::active]if]" href="#" onclick="Aps.query.addFilter('status','enabled')">
                        <span class="text-md">{i18n{ status.enabled }i18n}</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="py-3 nav-link [if[::constants.Params.status=trash::active]if]" href="#" onclick="Aps.query.addFilter('status','trash')">
                        <span class="text-md">{i18n{ status.trash }i18n}</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="py-3 nav-link [not[::constants.Params.status::active]not]" href="#" onclick="Aps.query.removeFilter('status')">
                        <span class="text-md">{i18n{ status.all }i18n}</span>
                    </a>
                </li>

            </ul>

            <div class="col-auto">

                <a class="btn btn-md btn-primary mr-3 mt-2"href="./add">
                    <i class="fe fe-plus-circle"></i> 添加物流
                </a>
            </div>

        </div>


    </div>




    <div class="container-fluid">
        <div class="row justify-content-center">
            <div class="col-12">

                <div class="card">

                    <div class="tab-content">

                        <div class="tab-pane table-responsive active mb-0">
                            <table class="table table-sm card-table" >
                                <thead>
                                <tr>
                                    <th>UID</th>
                                    <th>{i18n{ manager.cover }i18n}</th>
                                    <th>{i18n{ manager.title }i18n}</th>
                                    <th>{i18n{ manager.description }i18n}</th>
                                    <th>配送费($)</th>
                                    <th>{i18n{ manager.createtime }i18n}</th>
                                    <th>{i18n{ manager.isFeatured }i18n}</th>
                                    <th>{i18n{ manager.sort }i18n}</th>
                                    <th>{i18n{ manager.status }i18n}</th>
                                    <th>{i18n{ manager.operation }i18n}</th>
                                    <th>{i18n{ manager.more }i18n}</th>
                                </tr>
                                </thead>
                                <tbody class="list">
                                [not[::shippingList::
                                <tr>
                                    <td colspan="10">
                                        <div class="row justify-content-center">
                                            <div class="col-12 col-md-8 col-xl-6 py-5">

                                                <h2>
                                                    {i18n{SYS_NON}i18n}
                                                </h2>

                                                <a class="btn btn-primary lift" onclick="Aps.router.back(-1)">
                                                    {i18n{ back }i18n}
                                                </a>

                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                ]not]

                                ||loop??shippingList??
                                <tr class="col-6 col-md-4 col-lg-12">
                                    <td class="p-2">{{shippingid}}</td>
                                    <td class="p-2">
                                        <div class="avatar avatar-lg">
                                            <img src="{{cover}}!avatar" alt="..." class="avatar-img rounded">
                                        </div>
                                    </td>
                                    <td class="p-2">{{title}}</td>
                                    <td class="p-2 goal-rows">{{description}}</td>
                                    <td class="p-2">{{amount}}</td>
                                    <td class="p-2">{{createtime_}}</td>
                                    <td class="p-2 [if[::featured=0::text-muted]if] [if[::featured=1::text-primary]if]">{i18n{ isFeatured.{{featured}} }i18n}</td>
                                    <td class="p-2 ">{{sort}}</td>
                                    <td class="p-2 [if[::status=trash::text-muted]if]">{{status_}}</td>
                                    <td class="p-2">
                                        <a href="edit/{{shippingid}}" ><span class="fe fe-edit font-size-lg"></span></a>
                                        <a onclick="MANAGER.sortUp('{{shippingid}}','CommerceShipping')"><span class="fe fe-chevrons-up font-size-lg"></span></a>
                                        <a onclick="MANAGER.sortDown('{{shippingid}}','CommerceShipping')"><span class="fe fe-chevrons-down font-size-lg"></span></a>
                                    </td>
                                    <td class="p-2 text-right">
                                        <div class="dropdown">
                                            <a href="#" class="dropdown-ellipses dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                <i class="fe fe-more-vertical"></i>
                                            </a>
                                            <div class="dropdown-menu dropdown-menu-right">

                                                [if[::featured=0::
                                                <a class="dropdown-item" onclick="MANAGER.feature('{{shippingid}}','CommerceShipping')"><span class="fe fe-arrow-up-circle mr-2 text-primary"></span>{i18n{ manager.feature }i18n}</a>
                                                ]if]

                                                [if[::featured=1::
                                                <a class="dropdown-item" onclick="MANAGER.cancelFeature('{{shippingid}}','CommerceShipping')"><span class="fe fe-arrow-down-circle mr-2 text-primary"></span>{i18n{ manager.unFeature }i18n}</a>
                                                ]if]

                                                [if[::status=enabled::
                                                <a class="dropdown-item" onclick="MANAGER.trash('{{shippingid}}','CommerceShipping');"><span class="fe fe-trash-2 mr-2 text-warning"></span>{i18n{ manager.trash }i18n}</a>
                                                <a class="dropdown-item" onclick="MANAGER.preRemove('{{shippingid}}','CommerceShipping');"><span class="fe fe-delete mr-2 text-danger"></span>{i18n{ manager.delete }i18n}</a>
                                                ]if]

                                                [if[::status^trash,offline::
                                                <a class="dropdown-item" onclick="MANAGER.recover('{{shippingid}}','CommerceShipping');"><span class="fe fe-check-circle mr-2 text-success"></span>{i18n{ manager.accept }i18n}</a>
                                                <a class="dropdown-item" onclick="MANAGER.remove('{{shippingid}}','CommerceShipping');"><span class="fe fe-delete mr-2 text-danger"></span>{i18n{ manager.delete }i18n}</a>
                                                ]if]
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                loop||
                                </tbody>
                            </table>
                        </div>

                    </div>

                </div>

                <nav aria-label="Page navigation example">
                    <ul class="pagination">

                        [if[::pager.first::
                        <li class="page-item"><a class="page-link" href="#" onclick="Aps.query.addFilter('page','1')">{i18n{ firstPage }i18n}</a></li>
                        ]if]

                        [if[::pager.prev::
                        <li class="page-item"><a class="page-link" href="#" onclick="Aps.query.addFilter('page','{{pager.prev}}')">{i18n{ prevPage }i18n}</a></li>
                        ]if]

                        ||loop??pager.list??
                        [if[::current:: <li class="page-item active"><a class="page-link" href="#" >{{page}}</a></li> ]if]
                        [not[::current::<li class="page-item"><a class="page-link" href="#" onclick="Aps.query.addFilter('page','{{page}}')">{{page}}</a></li> ]not]
                        loop||

                        [if[::pager.next::
                        <li class="page-item"><a class="page-link" href="#" onclick="Aps.query.addFilter('page','{{pager.next}}')">{i18n{ nextPage }i18n}</a></li>
                        ]if]

                        [if[::pager.last::
                        <li class="page-item"><a class="page-link" href="#" onclick="Aps.query.addFilter('page','{{pager.last}}')">{i18n{ lastPage }i18n} ({{pager.last}})</a></li>
                        ]if]

                    </ul>
                </nav>


            </div>
        </div> <!-- / .row -->
    </div>
</div>